//
//  JwCommon.h
//  JwPack
//
//  Created by 陈警卫 on 2024-08-13.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface JwCommon : NSObject

/// 判断(nil, NULL, [NSNull null]) 返回YES
+ (BOOL)isBlank:(id)value;

/// 时间戳
+ (NSString *)timestamp;

/// 时钟戳
+ (NSString *)dateFmtString;

/// 随机数
+ (NSString *)randomString;

/// 校验字符串
+ (NSString *)stringValue:(id)value;

/// 退出程序
+ (void)exit;

@end

@interface JwCommon (JwUI)

/// 改变Label中的字体颜色
+ (void)label:(UILabel *)label text:(NSString *)text color:(UIColor *)color;

/// 改变Label中的字体大小
+ (void)label:(UILabel *)label text:(NSString *)text font:(UIFont *)font;

/// 改变Label中的字体属性
/// texts 需要改变的字符串数组
/// texts 对应的attrs属性
+ (void)label:(UILabel *)label texts:(NSArray *)texts attrss:(NSArray<NSDictionary<NSAttributedStringKey, id> *> *)attrss;

@end

NS_ASSUME_NONNULL_END
